//
//  NSCursor+BBCursors.m
//  MotoV4.1
//
//  Created by bsmith on Wed Oct 30 2002.
//  This file is part of BBTouch.
//
//  BBTouch is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.

//  BBTouch is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Lesser General Public License for more details.

//  You should have received a copy of the GNU Lesser General Public License
//  along with BBTouch.  If not, see <http://www.gnu.org/licenses/>.
// 
//  Copyright 2008 Ben Britten Smith ben@benbritten.com .
//

#import "NSCursor+BBCursors.h"

@implementation NSCursor(BBCustomCursor)

+(NSCursor *)BBUpperRightRotate;
{
	static NSCursor * BBUpperRightRotate = nil;
  if (!BBUpperRightRotate) {
		
    NSImage *rr = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"rotate_upperRight" ofType:@"png"]];
    NSSize rrSize = [rr size];
    NSPoint hotspot = NSMakePoint((rrSize.width/2.0),(rrSize.height/2.0));
    BBUpperRightRotate = [[NSCursor alloc] initWithImage:rr hotSpot:hotspot];
		[rr release];
  }
  return BBUpperRightRotate;
}

+(NSCursor *)BBUpperLeftRotate;
{
	static NSCursor * BBUpperLeftRotate = nil;
  if (!BBUpperLeftRotate) {
		
    NSImage *rr = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"rotate_upperLeft" ofType:@"png"]];
    NSSize rrSize = [rr size];
    NSPoint hotspot = NSMakePoint((rrSize.width/2.0),(rrSize.height/2.0));
    BBUpperLeftRotate = [[NSCursor alloc] initWithImage:rr hotSpot:hotspot];
		[rr release];
  }
  return BBUpperLeftRotate;
}

+(NSCursor *)BBLowerLeftRotate;
{
	static NSCursor * BBLowerLeftRotate = nil;
  if (!BBLowerLeftRotate) {
		
    NSImage *rr = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"rotate_lowerLeft" ofType:@"png"]];
    NSSize rrSize = [rr size];
    NSPoint hotspot = NSMakePoint((rrSize.width/2.0),(rrSize.height/2.0));
    BBLowerLeftRotate = [[NSCursor alloc] initWithImage:rr hotSpot:hotspot];
		[rr release];
  }
  return BBLowerLeftRotate;
}

+(NSCursor *)BBLowerRightRotate;
{
	static NSCursor * BBLowerRightRotate = nil;
  if (!BBLowerRightRotate) {
		
    NSImage *rr = [[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"rotate_lowerRight" ofType:@"png"]];
    NSSize rrSize = [rr size];
    NSPoint hotspot = NSMakePoint((rrSize.width/2.0),(rrSize.height/2.0));
    BBLowerRightRotate = [[NSCursor alloc] initWithImage:rr hotSpot:hotspot];
		[rr release];
  }
  return BBLowerRightRotate;	
}


@end
